import request from '@/utils/request'

export function getRolePagedList(query) {
  return request({
    url: '/api/identity/groups_admin/',
    method: 'get',
    params: query
  })
}

export function getRole(id) {
  return request({
    url: `/api/identity/groups_admin/${id}/`,
    method: 'get'
  })
}

export function createRole(data) {
  return request({
    url: `/api/identity/groups_admin/`,
    method: 'post',
    data
  })
}

export function updateRole(id, data) {
  return request({
    url: `/api/identity/groups_admin/${id}/`,
    method: 'put',
    data
  })
}

export function deleteRole(id) {
  return request({
    url: `/api/identity/groups_admin/${id}/`,
    method: 'delete'
  })
}
